Skip to content

feat: Dynamic assertion payloads v2#5949

Merged
TomAFrench merged 38 commits into
masterfrom
arv/dynamic_assert_messages_2
Apr 26, 2024
Merged

feat: Dynamic assertion payloads v2#5949
TomAFrench merged 38 commits into
masterfrom
arv/dynamic_assert_messages_2

Conversation

@sirasistant

@sirasistant sirasistant commented Apr 23, 2024

Copy link
Copy Markdown
Contributor

This PR implements this proposal: noir-lang/noir#4239 (comment)

  • Removes legacy dynamic assertions via calling brillig + oracle
  • Removes legacy oracle handling for assertions
  • Frontend adds the HirType in the ConstrainError instead of embedding metadata about it in the program logic.
  • Constrain instruction in SSA now has Values for payload
  • SSA gen generates an error selector from the payload type
  • ACIR gen and Brillig gen handle the payload ValueIds and error selector
  • ABI has now error_types for non-string errors
  • ACVM now resolves the payload for non-constant AssertionPayloads
  • Nargo decodes the error for non-string errors using the ABI, allowing use in nargo tests

Things to do in a followup PR:

  • Add an entry point in noirc_abi_wasm that allows decoding a given Raw (non-string) using the ABI in the same way that nargo does.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants